package chapter01;

public class Test22_ArarryMax {
    public static void main(String[] args) {
        int[] b = {1,2,4,5,1,5,38,12,45};
        System.out.println(getMax(b));
    }
    public static int getMax(int[] a){
        int max = a[0];
        for (int i=0;i<a.length;i++){
            if (max<a[i]){
                max=a[i];
            }
        }
        return max;
    }
}
